package edu.nf.postlikework.common.config;

import lombok.RequiredArgsConstructor;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 * @author zjl
 * @date 2025/10/13
 */
@Configuration
@RequiredArgsConstructor
public class RabbitConfig {

    /**
     * 交换机名称
     */
    public static final String EXCHANGE_NAME = "like.exchange";
    /**
     * 队列名称
     */
    public static final String QUEUE_NAME = "like.queue";

    /**
     * 路由的KEY
     */
    public static final String ROUTER_KEY = "like.key";

    @Bean
    public MessageConverter messageConverter() {
        return new Jackson2JsonMessageConverter();
    }
}
